﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ZR.Model.Models._2409
{
    [SugarTable("device_status_log")]
    [Table(Name = "device_status_log")]
    public class DeviceStatusLog : BaseEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        [Column(IsPrimary = true, IsIdentity = true)]
        public long Id { get; set; }

        public string DeviceCode {  get; set; }

        public int PlcId {  get; set; }

        public DateTime LogTime {  get; set; } = DateTime.Now;
        /// <summary>
        /// 运行状态：1=空闲，2=运行中，3=故障；4=待料中；
        /// </summary>
        public int RunState {  get; set; }
        /// <summary>
        /// 设备模式：1=空模式；2=手动；4=初始化；8=自动；16=自动模式下暂停;
        /// </summary>
        public int DeviceMode {  get; set; }

        public int IsRunning {  get; set; }

        public string Remark { get; set; } = string.Empty;


        /// <summary>
        /// Nullity 
        /// </summary>
        public bool Nullity { get; set; }

        /// <summary>
        /// CreatedTime 
        /// </summary>
        public DateTime CreatedTime { get; set; } = DateTime.Now;
    }
}
